//
//  CLGAVPlayerPlaybackView.m
//  CLGPlayerDemo
//
//  Created by GuochengLiu on 2016/11/28.
//  Copyright © 2016年 sumavision. All rights reserved.
//

#import "CLGAVPlayerPlaybackView.h"
#import <AVFoundation/AVFoundation.h>


@implementation CLGAVPlayerPlaybackView

+ (Class)layerClass
{
    return [AVPlayerLayer class];
}

- (AVPlayer*)player
{
    return [(AVPlayerLayer*)[self layer] player];
}

- (void)setPlayer:(AVPlayer*)player
{
    [(AVPlayerLayer*)[self layer] setPlayer:player];
}

- (void)setVideoFillMode:(NSString *)fillMode
{
    AVPlayerLayer *playerLayer = (AVPlayerLayer*)[self layer];
    playerLayer.videoGravity = fillMode;
}

@end
